package pers.dzk.fivelnarow.config;

import pers.dzk.fivelnarow.config.util.ResourcesPath;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.charset.StandardCharsets;
import java.util.Properties;

/**
 * @author 丁泽凯
 */
public class MainWindowConfig {
    public static Properties pro;
    static {
        pro = new Properties();
        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(ResourcesPath.CONFIG_PATH+"/MainWinidow.properties"), StandardCharsets.ISO_8859_1));
            pro.load(br);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    public static int getWidth(){
        return Integer.parseInt(pro.getProperty("Width"));
    }
    public static int getHeight(){
        return Integer.parseInt(pro.getProperty("Height"));
    }
}
